<template>
    <div style="background: #fff; width: 100%">
        <a-tabs type="card" v-model:activeKey="activeKey">
            <a-tab-pane key="1" tab="北极星指标">
                <div style="padding: 16px">
                    <div>
                        <flexbox>
                            <img src="@/assets/images/beijixing/beijixing-icon.png" style="width: 24px" />
                            <span class="margin-l-8 font-w-b">指标公式拆分</span>
                        </flexbox>
                        <div style="color: #70798b" class="margin-t-8"
                            >拆分因子可靠性分析：警告越多代表数据录入规范性越差，指标可靠性越低；对勾越多代表指标可靠性越高</div
                        >
                        <div style="margin-top: 24px; font-size: 16px"
                            >缺陷率 = 【极高缺陷数】x 10（系数）+ 【高级缺陷数量】x 3（系数）+【中级缺陷数量】x 1（系数）+【低级缺陷数量】x
                            0.1（系数）</div
                        >

                        <div style="color: #70798b" class="margin-t-8"
                            >指标定义：按照预发布版本研发过程中缺陷数量进行统计，求所有已上线版本的缺陷率平均值；缺陷提出及定级工作由测试人员与开发、产品沟通协调后确定，数据来源测试管理平台</div
                        >
                    </div>
                </div>
            </a-tab-pane>
        </a-tabs>
        <ZhiBiaoTongjiTable :detail="detail" style="margin-top: 32px" />
    </div>
</template>

<script lang="ts">
import ZhiBiaoTongjiTable from './components/ZhiBiaoTongjiTable.vue';
import { useRouter, useRoute } from 'vue-router';
import { defineComponent, reactive, toRefs } from 'vue';
export default defineComponent({
    components: {
        ZhiBiaoTongjiTable
    },
    props: {
        detail: {
            type: Object,
            default: () => ({})
        }
    },
    setup() {
        const router = useRouter();
        const route = useRoute();
        const state = reactive<any>({
            activeKey: '1'
        });
        const jumpTo = () => {
            router.push({
                path: '/energyManage/beijixing/detail/jiraTrack',
                query: {
                    ...route.query
                }
            });
        };
        return {
            ...toRefs(state),
            jumpTo
        };
    }
});
</script>

<style scoped lang="less">
.page-wrap {
    position: relative;
    height: 100%;
    .page-header-wrap {
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 9;
        border-bottom: 1px solid #f1f1f1;
        border-top: 1px solid #f1f1f1;
        margin-bottom: 24px;
        &::before {
            content: '';
            position: absolute;
            width: 6px;
            height: 100%;
            background: #3094e9;
            top: 0;
            left: 0;
            z-index: 1;
        }
        .extra-wrap {
            position: absolute;
            right: 40px;
            bottom: 22px;
            color: #000;
            cursor: pointer;
        }
    }
}
.section-wrap {
    padding: 0;
}
// // 去掉表头颜色
::v-deep(.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab) {
    margin-right: 0px !important;
    border: none;
    background: #edeff3;
    border-radius: 0;
}
::v-deep(.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active) {
    background: #fff;
    border-radius: 4px 4px 0px 0px;
}

.warning-cont {
    color: #505a6e;
    background: #fff7e6;
    border: 1px solid #ffe58f;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
}
.success-cont {
    color: #505a6e;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
}
</style>
